from transformers import pipeline

generator = pipeline('text-generation','I:\\models\\AI-ModelScope\\chinese-alpaca-2-7b\\')

outputs = generator('中国的首都是?')
print(outputs[0]['generated_text'])